package com.youths.domain;

import com.youths.util.StringUtil;
import lombok.Data;

import java.awt.geom.FlatteningPathIterator;
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by IntelliJ IDEA.
 * User: KingRainGrey
 * Date: 2020/7/16
 */

public class ReturnVerify extends Page implements Serializable {
    private String taskId;
    private String taskStr;

    private String sliceStr;

    public String createTime;

    private Float age;

    private Float height;

    private Float weight;

    public ReturnVerify() {}

    public void setTaskId(Integer id) {
        this.taskId = (10000000 + id) + "";
    }

    public void setSliceStr(Integer sliceId) {
        this.sliceStr = StringUtil.encryption(sliceId);
    }

    public void setCreateTime(Date time) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        this.createTime = sdf.format(time);
    }

    public void setAge(Date time, Date checkTime) {
        this.age = StringUtil.getAge(time, checkTime);
    }

    public void setHeight(Float height) {
        this.height = height;
    }

    public void setWeight(Float weight) {
        this.weight = weight;
    }

    public String getTaskId() {
        return taskId;
    }

    public String getSliceStr() {
        return sliceStr;
    }

    public String getCreateTime() {
        return createTime;
    }

    public Float getAge() {
        return age;
    }

    public Float getHeight() {
        return height;
    }

    public Float getWeight() {
        return weight;
    }

    public String getTaskStr() {
        return taskStr;
    }

    public void setTaskStr(Integer id) {
        this.taskStr = StringUtil.encryption(id);
    }
}
